package com.sike.netty.im.client.service;

import com.sike.netty.im.client.event.CustomEvent;
import com.sike.netty.im.client.event.EventFactory;
import com.sike.netty.im.client.event.EventTypeEnum;
import io.netty.channel.ChannelHandlerContext;

public class ClientService {

    /**
     * 去主菜单
     * @param ctx
     */
    public void toMainMenu(ChannelHandlerContext ctx) {
        CustomEvent customEvent = EventFactory.getCustomEvent(EventTypeEnum.MAIN_MENU_EVENT.getEvent());
        ctx.pipeline().fireUserEventTriggered(customEvent);
    }

    /**
     * 退出登录
     * @param ctx
     */
    public void exitLogin(ChannelHandlerContext ctx) {
        // todo 后面实现
    }
}
